// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * CatalogProductSuperAttribute generated by hbm2java
 */
@Entity
@Table(name = "catalog_product_super_attribute", catalog = "magento", uniqueConstraints = @UniqueConstraint(columnNames = {
		"product_id", "attribute_id" }))
public class CatalogProductSuperAttribute implements java.io.Serializable {

	private Integer productSuperAttributeId;
	private CatalogProductEntity catalogProductEntity;
	private short attributeId;
	private short position;
	private Set catalogProductSuperAttributePricings = new HashSet(0);
	private Set catalogProductSuperAttributeLabels = new HashSet(0);

	public CatalogProductSuperAttribute() {
	}

	public CatalogProductSuperAttribute(
			CatalogProductEntity catalogProductEntity, short attributeId,
			short position) {
		this.catalogProductEntity = catalogProductEntity;
		this.attributeId = attributeId;
		this.position = position;
	}

	public CatalogProductSuperAttribute(
			CatalogProductEntity catalogProductEntity, short attributeId,
			short position, Set catalogProductSuperAttributePricings,
			Set catalogProductSuperAttributeLabels) {
		this.catalogProductEntity = catalogProductEntity;
		this.attributeId = attributeId;
		this.position = position;
		this.catalogProductSuperAttributePricings = catalogProductSuperAttributePricings;
		this.catalogProductSuperAttributeLabels = catalogProductSuperAttributeLabels;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "product_super_attribute_id", unique = true, nullable = false)
	public Integer getProductSuperAttributeId() {
		return this.productSuperAttributeId;
	}

	public void setProductSuperAttributeId(Integer productSuperAttributeId) {
		this.productSuperAttributeId = productSuperAttributeId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "product_id", nullable = false)
	public CatalogProductEntity getCatalogProductEntity() {
		return this.catalogProductEntity;
	}

	public void setCatalogProductEntity(
			CatalogProductEntity catalogProductEntity) {
		this.catalogProductEntity = catalogProductEntity;
	}

	@Column(name = "attribute_id", nullable = false)
	public short getAttributeId() {
		return this.attributeId;
	}

	public void setAttributeId(short attributeId) {
		this.attributeId = attributeId;
	}

	@Column(name = "position", nullable = false)
	public short getPosition() {
		return this.position;
	}

	public void setPosition(short position) {
		this.position = position;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "catalogProductSuperAttribute")
	public Set getCatalogProductSuperAttributePricings() {
		return this.catalogProductSuperAttributePricings;
	}

	public void setCatalogProductSuperAttributePricings(
			Set catalogProductSuperAttributePricings) {
		this.catalogProductSuperAttributePricings = catalogProductSuperAttributePricings;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "catalogProductSuperAttribute")
	public Set getCatalogProductSuperAttributeLabels() {
		return this.catalogProductSuperAttributeLabels;
	}

	public void setCatalogProductSuperAttributeLabels(
			Set catalogProductSuperAttributeLabels) {
		this.catalogProductSuperAttributeLabels = catalogProductSuperAttributeLabels;
	}

}
